// Copyright (C) joyinter
// All rights reserved.
// 
// Author : dengxinguo
// Date   : 2004-11-16

#ifndef __QUIT_H_CLIENT_MAIN__
#define __QUIT_H_CLIENT_MAIN__

#pragma once

#include "resource.h"
#include <common\ui\wnd.h>
#include <common\ui\button.h>
#include <common\ui\imagectrl.h>
#include <common\ui\label.h>
#include <Tlhelp32.h>

//##ModelId=44C4B5E001F4
class CJoyQuitWnd :
    public CJoyWnd
{
	DECLARE_DYNAMIC(CJoyQuitWnd)
public:
	//##ModelId=44C4B5E00204
    CJoyButton* m_btnNo;
	//##ModelId=44C4B5E00209
    CJoyButton* m_btnYes;
	//##ModelId=44C4B5E0020E
    CJoyImageCtrl *m_ImagCtrl;
	//##ModelId=44C4B5E00213
    bool m_bChooseYes; 
	//##ModelId=44C4B5E00214
    DWORD GetProcessID(CString ExeName);
	//##ModelId=44C4B5E00216
    void GetProInfo(DWORD th32ProcessID);
	//##ModelId=44C4B5E00222
	static BOOL  CALLBACK EnumThreadWndProc(HWND hwnd,LPARAM lParam);


	//##ModelId=44C4B5E00226
    virtual void CM_Draw(Graphics& graph);
	//##ModelId=44C4B5E00232
    virtual void CM_NoClick(CJoyButton*);
	//##ModelId=44C4B5E00235
    virtual void CM_YesClick(CJoyButton*);
	//##ModelId=44C4B5E00238
    virtual void CM_LoadSkin(CJoyXmlElement* pSkinElem);
public:
   

	//##ModelId=44C4B5E00244
    CJoyQuitWnd(void);
	//##ModelId=44C4B5E00246
    virtual ~CJoyQuitWnd(void);

	//##ModelId=44C4B5E00249
    void OnCancel();
public:
    DECLARE_MESSAGE_MAP()
	//##ModelId=44C4B5E00251
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//##ModelId=44C4B5E00254
    afx_msg UINT OnNcHitTest(CPoint point);
	//##ModelId=44C4B5E00261
    afx_msg void OnDestroy();
   
};

//##ModelId=44C4B5E00263
class CJoyQuitDlg : public CDialog
{
	DECLARE_DYNAMIC(CJoyQuitDlg)

protected:
  

public:

	//##ModelId=44C4B5E00273
	CJoyQuitWnd  m_QuitWnd;
	//##ModelId=44C4B5E00277
	CJoyQuitDlg(CWnd* pParent);   // standard constructor
	//##ModelId=44C4B5E00281
	virtual ~CJoyQuitDlg();

  

// Dialog Data
	enum { IDD = IDD_JOYSETTINGDLG };

protected:
	//##ModelId=44C4B5E00283
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()
public:
	//##ModelId=44C4B5E00286
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	//##ModelId=44C4B5E00291
    afx_msg void OnSize(UINT nType, int cx, int cy);
	//##ModelId=44C4B5E00296
    afx_msg UINT OnNcHitTest(CPoint point);
	//##ModelId=44C4B5E002A0
    afx_msg void OnClose();
};


#endif  // __QUIT_H_CLIENT_MAIN__
